package com.danciyixue.boot.dcyx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.danciyixue.boot.dcyx.model.entity.UserWordStatus;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.danciyixue.boot.dcyx.model.query.UserWordStatusQuery;
import com.danciyixue.boot.dcyx.model.vo.UserWordStatusVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 用户单词学习状态Mapper接口
 *
 * @author youlaitech
 * @since 2025-06-24 15:50
 */
@Mapper
public interface UserWordStatusMapper extends BaseMapper<UserWordStatus> {

    /**
     * 获取用户单词学习状态分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return {@link Page<UserWordStatusVO>} 用户单词学习状态分页列表
     */
    Page<UserWordStatusVO> getUserWordStatusPage(Page<UserWordStatusVO> page, UserWordStatusQuery queryParams);

    /**
     * 根据用户ID和单词ID查询用户单词学习状态
     *
     * @param userId 用户ID
     * @param wordId 单词ID
     * @return 用户单词学习状态实体
     */
    UserWordStatus findByUserIdAndWordId(Long userId, Long wordId);

}
